import Cookies from 'js-cookie'

const TokenKey = 'Admin-Token'

//获取vite.config.js的配置
const vite_domain = import.meta.env.VITE_DOMAIN;

export function getToken() {
  return Cookies.get(TokenKey,{ domain: vite_domain })
}

export function setToken(token) {
  return Cookies.set(TokenKey, token,{ domain: vite_domain })
}

export function removeToken() {
  return Cookies.remove(TokenKey,{ domain: vite_domain })
}
